If you run into any problems during the usage of PolyMAPS, please do not hesitate to contact the author: xyan11@uic.edu
Necessary installations for Google Colab.
Install conda, might need to restart the runtime, do not delete the runtime!
!sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
!sudo apt-get update
!sudo apt-get update --fix-missing
!sudo apt-get dist-upgrade
!sudo apt-get install gcc-4.9 g++-4.9 gcc-4.9-multilib -y
!sudo apt-get upgrade libstdc++6 -y
!pip install -q condacolab
import condacolab
condacolab.install()
!conda --version
!which conda
!conda install -c conda-forge -y requests lammps gxx_linux-64 -y
!conda update -c conda-forge jpeg -y
!pip install polymaps
exit()
Download required files:
!wget -N https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/MeOH_head.lmp
!wget -N https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/MeOH_tail.lmp
!wget -N https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/eo_monomer.lmp
!wget -N https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/par_all36_cgenff.prm
--2023-08-11 11:59:42-- https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/MeOH_head.lmp Resolving gitlab.com (gitlab.com)... 172.65.251.78, 2606:4700:90:0:f22e:fbec:5bed:a9b9 Connecting to gitlab.com (gitlab.com)|172.65.251.78|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1692 (1.7K) [text/plain] Saving to: ‘MeOH_head.lmp’ MeOH_head.lmp 100%[===================>] 1.65K --.-KB/s in 0s Last-modified header missing -- time-stamps turned off. 2023-08-11 11:59:42 (3.52 MB/s) - ‘MeOH_head.lmp’ saved [1692/1692] --2023-08-11 11:59:43-- https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/MeOH_tail.lmp Resolving gitlab.com (gitlab.com)... 172.65.251.78, 2606:4700:90:0:f22e:fbec:5bed:a9b9 Connecting to gitlab.com (gitlab.com)|172.65.251.78|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1209 (1.2K) [text/plain] Saving to: ‘MeOH_tail.lmp’ MeOH_tail.lmp 100%[===================>] 1.18K --.-KB/s in 0s Last-modified header missing -- time-stamps turned off. 2023-08-11 11:59:43 (2.38 MB/s) - ‘MeOH_tail.lmp’ saved [1209/1209] --2023-08-11 11:59:43-- https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/eo_monomer.lmp Resolving gitlab.com (gitlab.com)... 172.65.251.78, 2606:4700:90:0:f22e:fbec:5bed:a9b9 Connecting to gitlab.com (gitlab.com)|172.65.251.78|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2212 (2.2K) [text/plain] Saving to: ‘eo_monomer.lmp’ eo_monomer.lmp 100%[===================>] 2.16K --.-KB/s in 0s Last-modified header missing -- time-stamps turned off. 2023-08-11 11:59:43 (8.54 MB/s) - ‘eo_monomer.lmp’ saved [2212/2212] --2023-08-11 11:59:43-- https://gitlab.com/doublylinkedlist/20210505_demo/-/raw/master/par_all36_cgenff.prm Resolving gitlab.com (gitlab.com)... 172.65.251.78, 2606:4700:90:0:f22e:fbec:5bed:a9b9 Connecting to gitlab.com (gitlab.com)|172.65.251.78|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 713885 (697K) [text/plain] Saving to: ‘par_all36_cgenff.prm’ par_all36_cgenff.pr 100%[===================>] 697.15K 4.48MB/s in 0.2s Last-modified header missing -- time-stamps turned off. 2023-08-11 11:59:44 (4.48 MB/s) - ‘par_all36_cgenff.prm’ saved [713885/713885]
from polymaps.util import *
Ethylene Oxide monomer and visualization (purple atom act as the anchoring point)
_ = open_lmp_data('./eo_monomer.lmp', viz=True)
Terminal segment without anchoring point and visualization
_ = open_lmp_data('./MeOH_tail.lmp', viz=True)
Terminal segment with anchoring point and visualization (purple atom act as the anchoring point)
_ = open_lmp_data('./MeOH_head.lmp', viz=True)
Building a single chain of poly ethylene oxide (degree of polymerization at 3)
dop = 3
polymer_mass_df, polymer_df, polymer_bond_df, polymer_angle_df, polymer_dihedral_df, polymer_improper_df = build_peo(dop)
viz_mol(polymer_df, polymer_bond_df)
Add force field parameters to the built polymer chain
lj_prm, bond_prm, angle_prm, dihedral_prm, improper_prm, xlo, xhi, ylo, yhi, zlo, zhi = assign_cgenff('./data.cgenff36', polymer_mass_df, polymer_df, polymer_bond_df, polymer_angle_df, polymer_dihedral_df, polymer_improper_df)
mass_df, df, bond_df, angle_df, dihedral_df, improper_df, box, _lj_coeff, _bond_coeff, _angle_coeff, _dihedral_coeff, _improper_coeff = open_lmp_data('./data.cgenff36', box=True)
type2cgenff = dict(zip(polymer_df["type"], polymer_df["cgenff"]))
Written to file: ./data.cgenff36
Review of used force field parameters: Lennard-Jones
lj_prm
| at | ignored1 | epsilon | Rmin/2 | ignored2 | eps,1-4 | Rmin/2,1-4 | comment | sigma/2 | sigma/2,1-4 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | HGA2 | 0.0 | -0.0350 | 1.3400 | 0.0 | 0.00 | 0.0 | # alkane, igor, 6/05 | 1.193804 | 0.000000 |
| 2 | HGP1 | 0.0 | -0.0460 | 0.2245 | 0.0 | 0.00 | 0.0 | # polar H | 0.200007 | 0.000000 |
| 3 | CG321 | 0.0 | -0.0560 | 2.0100 | 0.0 | -0.01 | 1.9 | # alkane (CT2), 4/98, yin, adm jr, also used ... | 1.790706 | 1.692708 |
| 4 | OG301 | 0.0 | -0.1000 | 1.6500 | 0.0 | 0.00 | 0.0 | # ether; LJ from THP, sng 1/06 | 1.469983 | 0.000000 |
| 5 | OG311 | 0.0 | -0.1921 | 1.7650 | 0.0 | 0.00 | 0.0 | # og MeOH and EtOH 1/06 (was -0.1521 1.7682) | 1.572436 | 0.000000 |
Review of used force field parameters: bonds
bond_prm
| at1 | at2 | Kb | b0 | comment | |
|---|---|---|---|---|---|
| 1 | CG321 | CG321 | 222.5 | 1.530 | # PROT alkane update, adm jr., 3/2/92 |
| 2 | CG321 | OG301 | 360.0 | 1.415 | # diethylether, alex |
| 3 | CG321 | OG311 | 428.0 | 1.420 | # PROT methanol vib fit EMB 11/21/89 |
| 4 | CG321 | HGA2 | 309.0 | 1.111 | # PROT alkane update, adm jr., 3/2/92 |
| 5 | OG301 | OG311 | 300.0 | 1.461 | # PBG, yxu, RNA |
| 6 | OG311 | HGP1 | 545.0 | 0.960 | # PROT EMB 11/21/89 methanol vib fit; og test... |
Review of used force field parameters: angle
angle_prm
| at1 | at2 | at3 | Ktheta | r | kUB | rUB | comment | |
|---|---|---|---|---|---|---|---|---|
| 1 | CG321 | CG321 | CG321 | 58.35 | 113.60 | 11.16 | 2.561 | # PROT alkane update, adm jr., 3/2/92 |
| 2 | CG321 | CG321 | OG301 | 45.00 | 111.50 | 0.00 | 0.000 | # diethylether, alex |
| 3 | CG321 | CG321 | OG311 | 75.70 | 110.10 | 0.00 | 0.000 | # PROT MeOH, EMB, 10/10/89 |
| 4 | CG321 | CG321 | HGA2 | 26.50 | 110.10 | 22.53 | 2.179 | # PROT alkane update, adm jr., 3/2/92 |
| 5 | OG301 | CG321 | HGA2 | 45.90 | 108.89 | 0.00 | 0.000 | # ETOB, Ethoxybenzene, cacha |
| 6 | OG311 | CG321 | HGA2 | 45.90 | 108.89 | 0.00 | 0.000 | # PROT MeOH, EMB, 10/10/89 |
| 7 | HGA2 | CG321 | HGA2 | 35.50 | 109.00 | 5.40 | 1.802 | # PROT alkane update, adm jr., 3/2/92 |
| 8 | CG321 | OG301 | CG321 | 95.00 | 109.70 | 0.00 | 0.000 | # diethylether, alex |
| 9 | CG321 | OG311 | HGP1 | 50.00 | 106.00 | 0.00 | 0.000 | # sng mod (qm and crystal data); was 57.5 106 |
| 10 | OG301 | OG311 | HGP1 | 61.00 | 98.30 | 0.00 | 0.000 | # PBG, yxu, RNA |
Review of used force field parameters: dihedral
dihedral_prm
| at1 | at2 | at3 | at4 | Kchi | n | delta | comment | |
|---|---|---|---|---|---|---|---|---|
| 1 | CG321 | CG321 | CG321 | CG321 | 0.06450 | 2 | 0.0 | # LIPID alkane, 4/04, jbk (Jeff Klauda) |
| 2 | CG321 | CG321 | CG321 | CG321 | 0.14975 | 3 | 180.0 | # LIPID alkane, 4/04, jbk |
| 3 | CG321 | CG321 | CG321 | CG321 | 0.09458 | 4 | 0.0 | # LIPID alkane, 4/04, jbk |
| 4 | CG321 | CG321 | CG321 | CG321 | 0.11251 | 5 | 0.0 | # LIPID alkane, 4/04, jbk |
| 5 | CG321 | CG321 | CG321 | OG301 | 0.16000 | 1 | 180.0 | # methylpropylether, 2/12/05, ATM |
| 6 | CG321 | CG321 | CG321 | OG301 | 0.39000 | 2 | 0.0 | # methylpropylether |
| 7 | CG321 | CG321 | CG321 | OG311 | 0.19500 | 3 | 0.0 | # PROT alkane update, adm jr., 3/2/92 |
| 8 | CG321 | CG321 | CG321 | HGA2 | 0.19500 | 3 | 0.0 | # LIPID alkanes |
| 9 | OG301 | CG321 | CG321 | OG301 | 0.25000 | 1 | 180.0 | # 1,2 dimethoxyethane, 2/12/05, ATM |
| 10 | OG301 | CG321 | CG321 | OG301 | 1.24000 | 2 | 0.0 | # 1,2 dimethoxyethane |
| 11 | OG301 | CG321 | CG321 | HGA2 | 0.19000 | 3 | 0.0 | # alkane, 4/98, yin and mackerell |
| 12 | OG311 | CG321 | CG321 | HGA2 | 0.19500 | 3 | 0.0 | # PROT alkane update, adm jr., 3/2/92 |
| 13 | HGA2 | CG321 | CG321 | HGA2 | 0.22000 | 3 | 0.0 | # LIPID alkanes |
| 14 | CG321 | CG321 | OG301 | CG321 | 0.57000 | 1 | 0.0 | # 1,2 dimethoxyethane, 2/12/05, ATM |
| 15 | CG321 | CG321 | OG301 | CG321 | 0.29000 | 2 | 0.0 | # 1,2 dimethoxyethane |
| 16 | CG321 | CG321 | OG301 | CG321 | 0.43000 | 3 | 0.0 | # 1,2 dimethoxyethane |
| 17 | HGA2 | CG321 | OG301 | CG321 | 0.28400 | 3 | 0.0 | # diethylether, alex |
| 18 | CG321 | CG321 | OG311 | HGP1 | 1.13000 | 1 | 0.0 | # og ethanol |
| 19 | CG321 | CG321 | OG311 | HGP1 | 0.14000 | 2 | 0.0 | # og ethanol |
| 20 | CG321 | CG321 | OG311 | HGP1 | 0.24000 | 3 | 0.0 | # og ethanol |
| 21 | HGA2 | CG321 | OG311 | HGP1 | 0.18000 | 3 | 0.0 | # og methanol |
Review of used force field parameters: improper
improper_prm
| at1 | at2 | at3 | at4 | Kpsi | ignored | psi0 | comment |
|---|
Assemble the polymer molecules into a larger system
Lx = xhi - xlo
Ly = yhi - ylo
Lz = zhi - zlo
Nx = 1
Ny = int(Lx/Ly)
Nz = int(Lx/Lz)
Lmax = max(Nx*Lx, Ny*Ly, Nz*Lz) + 2.0
print(Nx, Ny, Nz, Lmax)
lmp_build_bulk="""
units real
atom_style full
boundary p p p
read_data data.cgenff36
include cgenff36.ff
replicate """ + str(Nx) + """ """ + str(Ny) + """ """ + str(Nz) + """
variable xc equal 0.5*(xlo+xhi)
variable yc equal 0.5*(ylo+yhi)
variable zc equal 0.5*(zlo+zhi)
variable xLo equal -0.5*lx
variable xHi equal 0.5*lx
variable yLo equal -0.5*ly
variable yHi equal 0.5*ly
variable zLo equal -0.5*lz
variable zHi equal 0.5*lz
displace_atoms all move -${xc} -${yc} -${zc} units box
change_box all x final ${xLo} ${xHi} units box
change_box all y final ${yLo} ${yHi} units box
change_box all z final ${zLo} ${zHi} units box
#change_box all x final """ + "{:.2f}".format(-Lmax/2.) + """ """ + "{:.2f}".format(Lmax/2.) + """ units box
#change_box all y final """ + "{:.2f}".format(-Lmax/2.) + """ """ + "{:.2f}".format(Lmax/2.) + """ units box
#change_box all z final """ + "{:.2f}".format(-Lmax/2.) + """ """ + "{:.2f}".format(Lmax/2.) + """ units box
write_data bulk_melt.data.coeff pair ij
write_data bulk_melt.data nocoeff
"""
with open('in.build.bulk', 'w') as lmp_script_file:
lmp_script_file.write(lmp_build_bulk)
!export OMP_NUM_THREADS=1
!lmp_mpi -in in.build.bulk
mass_df, df, bond_df, angle_df, dihedral_df, improper_df, box, \
_lj_coeff, _bond_coeff, _angle_coeff, _dihedral_coeff, _improper_coeff = open_lmp_data('./bulk_melt.data', box=True, unwrap=True)
1 4 4 19.746637
LAMMPS (28 Mar 2023 - Update 1)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (-3 -1.89833 -2.425962) to (14.746637 1.89828 1.626167)
1 by 1 by 1 MPI processor grid
reading atoms ...
31 atoms
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
6 = max dihedrals/atom
scanning impropers ...
2 = max impropers/atom
reading bonds ...
30 bonds
reading angles ...
53 angles
reading dihedrals ...
41 dihedrals
reading impropers ...
16 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
14 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.004 seconds
Switching to CHARMM coulomb energy conversion constant (src/KSPACE/pair_lj_charmmfsw_coul_long.cpp:69)
Replication is creating a 1x4x4 = 16 times larger system...
orthogonal box = (-3 -1.89833 -2.425962) to (14.746637 13.28811 13.782554)
1 by 1 by 1 MPI processor grid
496 atoms
480 bonds
848 angles
656 dihedrals
256 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
14 = max # of special neighbors
special bonds CPU = 0.000 seconds
replicate CPU = 0.001 seconds
Displacing atoms ...
Changing box ...
orthogonal box = (-8.8733185 -1.89833 -2.425962) to (8.8733185 13.28811 13.782554)
Changing box ...
orthogonal box = (-8.8733185 -7.59322 -2.425962) to (8.8733185 7.59322 13.782554)
Changing box ...
orthogonal box = (-8.8733185 -7.59322 -8.104258) to (8.8733185 7.59322 8.104258)
System init for write_data ...
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.23113257
grid = 9 8 8
stencil order = 5
estimated absolute RMS force accuracy = 0.0022579745
estimated relative force accuracy = 6.7996615e-06
using double precision FFTW3
3d grid and FFT values/proc = 3120 576
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 14
ghost atom cutoff = 14
binsize = 7, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/charmmfsw/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
System init for write_data ...
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.23113257
grid = 9 8 8
stencil order = 5
estimated absolute RMS force accuracy = 0.0022579745
estimated relative force accuracy = 6.7996615e-06
using double precision FFTW3
3d grid and FFT values/proc = 3120 576
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
Total wall time: 0:00:00
Enter the external physical conditions to the simulation:
lmp_relax="""
variable Nprint equal 100
units real
atom_style full
boundary p p p
read_data bulk_melt.data
include cgenff36.ff
thermo ${Nprint}
thermo_style custom step dt cpu temp press density pe ke xlo xhi ylo yhi zlo zhi
thermo_modify flush yes
velocity all create 300.0 1234 rot no dist gaussian
minimize 1.0e-20 1.0e-20 1000 1000
#reset_timestep 0
dump dump1 all custom/mpiio ${Nprint} traj.lammpstrj id mol type element mass q x y z ix iy iz
dump dump2 all xyz/mpiio ${Nprint} traj.xyz
fix fxnpt all npt temp 300.0 300.0 150 iso 1.0 1.0 250
timestep 1.0
run 10000
unfix fxnpt
write_data data.* nocoeff
write_data data.relaxed nocoeff
"""
with open('in.relax', 'w') as lmp_script_file:
lmp_script_file.write(lmp_relax)
!lscpu
!OMP_NUM_THREADS=1 lmp_mpi -in in.relax
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 7950X 16-Core Processor
CPU family: 25
Model: 97
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
BogoMIPS: 8982.94
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
a cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall n
x mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_go
od nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni
pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes
xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy sv
m cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw t
opoext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2
smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap
avx512ifma clflushopt clwb avx512cd sha_ni avx512bw av
x512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 clzer
o xsaveerptr arat npt nrip_save tsc_scale vmcb_clean fl
ushbyasid decodeassists pausefilter pfthreshold v_vmsav
e_vmload avx512vbmi umip avx512_vbmi2 gfni vaes vpclmul
qdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fs
rm
Virtualization features:
Virtualization: AMD-V
Hypervisor vendor: Microsoft
Virtualization type: full
Caches (sum of all):
L1d: 512 KiB (16 instances)
L1i: 512 KiB (16 instances)
L2: 16 MiB (16 instances)
L3: 32 MiB (1 instance)
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer
sanitization
Spectre v2: Mitigation; Full AMD retpoline, IBPB conditional, IBRS_
FW, STIBP conditional, RSB filling
Srbds: Not affected
Tsx async abort: Not affected
LAMMPS (28 Mar 2023 - Update 1)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (-8.8733185 -7.59322 -8.104258) to (8.8733185 7.59322 8.104258)
1 by 1 by 1 MPI processor grid
reading atoms ...
496 atoms
reading velocities ...
496 velocities
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
6 = max dihedrals/atom
scanning impropers ...
2 = max impropers/atom
reading bonds ...
480 bonds
reading angles ...
848 angles
reading dihedrals ...
656 dihedrals
reading impropers ...
256 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
14 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.101 seconds
Switching to CHARMM coulomb energy conversion constant (src/KSPACE/pair_lj_charmmfsw_coul_long.cpp:69)
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.23113257
grid = 9 8 8
stencil order = 5
estimated absolute RMS force accuracy = 0.0022579745
estimated relative force accuracy = 6.7996615e-06
using double precision FFTW3
3d grid and FFT values/proc = 3120 576
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 14
ghost atom cutoff = 14
binsize = 7, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/charmmfsw/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Setting up cg style minimization ...
Unit style : real
Current step : 0
Per MPI rank memory allocation (min/avg/max) = 14.91 | 14.91 | 14.91 Mbytes
Step Dt CPU Temp Press Density PotEng KinEng Xlo Xhi Ylo Yhi Zlo Zhi
0 1 0 300 -78707.282 1.1813207 8077.3029 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
100 1 0.87425708 300 21895.586 1.1813207 -63.391365 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
200 1 1.740148 300 20521.084 1.1813207 -83.372491 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
300 1 2.6276458 300 19459.56 1.1813207 -97.980289 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
400 1 3.5241026 300 18606.354 1.1813207 -126.11909 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
424 1 3.9414177 300 18573.618 1.1813207 -126.15025 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
Loop time of 3.96848 on 1 procs for 424 steps with 496 atoms
98.4% CPU use with 1 MPI tasks x 1 OpenMP threads
Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
8077.30290471991 -126.150247147964 -126.150247147964
Force two-norm initial, final = 5692.2011 0.31696447
Force max component initial, final = 461.1167 0.032708471
Final line search alpha, max atom move = 1.1920929e-07 3.8991535e-09
Iterations, force evaluations = 424 899
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 3.6499 | 3.6499 | 3.6499 | 0.0 | 91.97
Bond | 0.078561 | 0.078561 | 0.078561 | 0.0 | 1.98
Kspace | 0.11576 | 0.11576 | 0.11576 | 0.0 | 2.92
Neigh | 0.021003 | 0.021003 | 0.021003 | 0.0 | 0.53
Comm | 0.031291 | 0.031291 | 0.031291 | 0.0 | 0.79
Output | 0.037368 | 0.037368 | 0.037368 | 0.0 | 0.94
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.03462 | | | 0.87
Nlocal: 496 ave 496 max 496 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9995 ave 9995 max 9995 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 322960 ave 322960 max 322960 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 322960
Ave neighs/atom = 651.12903
Ave special neighs/atom = 9.2258065
Neighbor list builds = 4
Dangerous builds = 0
WARNING: MPI-IO output is unmaintained and unreliable. Use with caution. (src/MPIIO/dump_custom_mpiio.cpp:47)
WARNING: MPI-IO output is unmaintained and unreliable. Use with caution. (src/MPIIO/dump_xyz_mpiio.cpp:46)
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.23113257
grid = 9 8 8
stencil order = 5
estimated absolute RMS force accuracy = 0.0022579745
estimated relative force accuracy = 6.7996615e-06
using double precision FFTW3
3d grid and FFT values/proc = 3120 576
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
Setting up Verlet run ...
Unit style : real
Current step : 424
Time step : 1
Per MPI rank memory allocation (min/avg/max) = 13.79 | 13.79 | 13.79 Mbytes
Step Dt CPU Temp Press Density PotEng KinEng Xlo Xhi Ylo Yhi Zlo Zhi
424 1 0 300 18573.618 1.1813207 -126.15025 442.65029 -8.8733185 8.8733185 -7.59322 7.59322 -8.104258 8.104258
500 1 0.25666556 170.64353 3208.7541 1.0684014 74.551205 251.7847 -9.1755167 9.1755167 -7.8518219 7.8518219 -8.3802643 8.3802643
600 1 0.56781809 179.68775 6640.6764 0.89854639 43.783818 265.12945 -9.7206471 9.7206471 -8.3183097 8.3183097 -8.8781477 8.8781477
700 1 0.86210053 174.62382 3780.5688 0.80320796 88.611279 257.65762 -10.090964 10.090964 -8.6352037 8.6352037 -9.2163692 9.2163692
800 1 1.1310751 202.0293 215.22076 0.79469165 104.69394 298.09444 -10.126883 10.126883 -8.6659406 8.6659406 -9.2491747 9.2491747
900 1 1.3966143 229.95298 1281.4831 0.82495787 127.21177 339.29585 -10.001491 10.001491 -8.5586381 8.5586381 -9.1346506 9.1346506
1000 1 1.7011394 247.77626 2611.2645 0.84173973 170.16881 365.59411 -9.9345775 9.9345775 -8.5013777 8.5013777 -9.0735365 9.0735365
1100 1 2.0049947 281.76347 5617.7015 0.81581441 185.27909 415.74227 -10.038717 10.038717 -8.5904938 8.5904938 -9.1686502 9.1686502
1200 1 2.3033976 290.3031 1540.7531 0.76003706 224.06346 428.3425 -10.278516 10.278516 -8.7956985 8.7956985 -9.3876655 9.3876655
1300 1 2.6033924 305.59243 -2059.1529 0.72167467 246.43613 450.90193 -10.457508 10.457508 -8.948868 8.948868 -9.5511437 9.5511437
1400 1 2.9165097 327.1047 1138.0047 0.71063502 238.59643 482.64331 -10.511382 10.511382 -8.99497 8.99497 -9.6003484 9.6003484
1500 1 3.2333687 323.29832 3101.936 0.68786948 241.18188 477.02698 -10.626086 10.626086 -9.0931267 9.0931267 -9.7051112 9.7051112
1600 1 3.5447451 295.77066 -2344.928 0.67093066 254.17098 436.4099 -10.714769 10.714769 -9.1690155 9.1690155 -9.7861075 9.7861075
1700 1 3.8468965 296.60495 -564.12421 0.65915623 216.74519 437.6409 -10.778191 10.778191 -9.2232887 9.2232887 -9.8440334 9.8440334
1800 1 4.1527679 293.1265 1875.4745 0.67199362 189.74327 432.50843 -10.709116 10.709116 -9.1641785 9.1641785 -9.7809449 9.7809449
1900 1 4.4692818 304.64949 2385.4029 0.6885054 152.52673 449.51062 -10.622814 10.622814 -9.0903263 9.0903263 -9.7021223 9.7021223
2000 1 4.7810154 297.61327 1913.245 0.70205285 153.87809 439.12867 -10.55404 10.55404 -9.0314744 9.0314744 -9.6393096 9.6393096
2100 1 5.0905464 290.79995 -152.39567 0.68725279 158.04376 429.07561 -10.629263 10.629263 -9.0958457 9.0958457 -9.7080132 9.7080132
2200 1 5.401584 307.18998 4603.9871 0.67345004 137.43202 453.25912 -10.701391 10.701391 -9.1575675 9.1575675 -9.773889 9.773889
2300 1 5.7004393 299.24537 3660.2677 0.64894124 150.26377 441.53684 -10.83445 10.83445 -9.2714316 9.2714316 -9.8954164 9.8954164
2400 1 5.9985634 302.76778 -568.33016 0.62977225 149.04591 446.73416 -10.94328 10.94328 -9.3645608 9.3645608 -9.9948134 9.9948134
2500 1 6.2550404 297.23858 2929.5323 0.6235179 161.80821 438.57581 -10.979748 10.979748 -9.3957679 9.3957679 -10.028121 10.028121
2600 1 6.5510031 297.01615 200.95502 0.63668368 169.17592 438.24761 -10.903538 10.903538 -9.3305523 9.3305523 -9.958516 9.958516
2700 1 6.8184081 305.47609 1481.5536 0.64458589 156.88839 450.73026 -10.858798 10.858798 -9.2922665 9.2922665 -9.9176535 9.9176535
2800 1 7.0751831 304.39199 73.525076 0.66206328 150.37314 449.13068 -10.762393 10.762393 -9.2097694 9.2097694 -9.8296042 9.8296042
2900 1 7.3623714 315.49222 5383.9254 0.68042411 120.72373 465.50907 -10.664703 10.664703 -9.1261729 9.1261729 -9.7403815 9.7403815
3000 1 7.6488564 300.36327 -73.072774 0.66992475 127.00139 443.1863 -10.720129 10.720129 -9.1736024 9.1736024 -9.7910031 9.7910031
3100 1 7.9258418 279.10939 -2580.9542 0.64937649 142.04509 411.82617 -10.832029 10.832029 -9.2693597 9.2693597 -9.893205 9.893205
3200 1 8.2185937 289.23278 -818.15863 0.63953375 116.81604 426.76325 -10.887317 10.887317 -9.3166711 9.3166711 -9.9437006 9.9437006
3300 1 8.5181169 285.12355 2366.3126 0.64552996 120.25368 420.70007 -10.853502 10.853502 -9.2877344 9.2877344 -9.9128164 9.9128164
3400 1 8.8241498 294.19703 1299.0414 0.65357015 112.35764 434.08801 -10.808811 10.808811 -9.2494914 9.2494914 -9.8719996 9.8719996
3500 1 9.0522834 298.73319 -1063.4705 0.66139856 117.23299 440.78112 -10.765997 10.765997 -9.2128537 9.2128537 -9.8328961 9.8328961
3600 1 9.3088737 305.2331 -2703.6003 0.65212252 116.35701 450.37174 -10.816804 10.816804 -9.2563306 9.2563306 -9.879299 9.879299
3700 1 9.5711537 322.04468 360.98773 0.6650854 102.40437 475.17724 -10.746067 10.746067 -9.1957986 9.1957986 -9.8146932 9.8146932
3800 1 9.8378615 298.80694 2420.1273 0.67356418 131.75629 440.88994 -10.700786 10.700786 -9.1570502 9.1570502 -9.7733369 9.7733369
3900 1 10.118008 298.06934 -1560.1898 0.67859297 116.97974 439.80161 -10.674287 10.674287 -9.1343743 9.1343743 -9.7491349 9.7491349
4000 1 10.417365 290.29637 -1993.4095 0.68000391 111.35654 428.33258 -10.6669 10.6669 -9.1280523 9.1280523 -9.7423874 9.7423874
4100 1 10.714793 290.41121 -399.04289 0.68319225 100.77975 428.50203 -10.65028 10.65028 -9.1138304 9.1138304 -9.7272084 9.7272084
4200 1 11.034291 297.104 -701.84368 0.69064671 88.82281 438.37724 -10.611824 10.611824 -9.0809219 9.0809219 -9.692085 9.692085
4300 1 11.349644 311.50338 -1016.0015 0.71484623 71.953037 459.62355 -10.4907 10.4907 -8.9772719 8.9772719 -9.5814592 9.5814592
4400 1 11.659352 299.5741 -1153.5085 0.75400167 97.862724 442.02188 -10.305868 10.305868 -8.8191045 8.8191045 -9.4126468 9.4126468
4500 1 11.96377 319.76502 -298.36813 0.76485665 76.037475 471.81359 -10.256881 10.256881 -8.7771848 8.7771848 -9.3679058 9.3679058
4600 1 12.276575 302.28849 1423.8028 0.75913599 95.027131 446.02696 -10.282581 10.282581 -8.7991772 8.7991772 -9.3913784 9.3913784
4700 1 12.609701 303.97417 -53.49868 0.74998473 63.882473 448.51418 -10.324235 10.324235 -8.8348216 8.8348216 -9.4294217 9.4294217
4800 1 12.893136 294.37561 -1864.1939 0.71988745 61.263448 434.3515 -10.466155 10.466155 -8.9562675 8.9562675 -9.5590411 9.5590411
4900 1 13.267886 288.63152 52.664028 0.70974958 63.962856 425.87608 -10.515751 10.515751 -8.998709 8.998709 -9.604339 9.604339
5000 1 13.559897 298.91588 2114.4994 0.71840888 57.386833 441.05067 -10.47333 10.47333 -8.9624076 8.9624076 -9.5655945 9.5655945
5100 1 13.837474 303.95074 742.37734 0.72572499 70.006688 448.47961 -10.438017 10.438017 -8.9321888 8.9321888 -9.533342 9.533342
5200 1 14.156768 296.3655 -2617.9394 0.7050883 104.96005 437.28759 -10.538873 10.538873 -9.0184954 9.0184954 -9.6254571 9.6254571
5300 1 14.451486 291.42692 -1511.7888 0.70188026 116.69643 430.0007 -10.554905 10.554905 -9.0322146 9.0322146 -9.6400996 9.6400996
5400 1 14.783895 304.24228 -2112.2912 0.72047397 97.179478 448.90978 -10.463314 10.463314 -8.9538364 8.9538364 -9.5564465 9.5564465
5500 1 15.096443 298.4415 -2660.9083 0.74140495 103.06433 440.35073 -10.363907 10.363907 -8.8687707 8.8687707 -9.4656557 9.4656557
5600 1 15.408138 307.84386 2976.5432 0.74760514 83.871463 454.22392 -10.335177 10.335177 -8.8441852 8.8441852 -9.4394155 9.4394155
5700 1 15.711891 294.55019 775.96232 0.75727464 90.337324 434.60909 -10.290999 10.290999 -8.8063806 8.8063806 -9.3990666 9.3990666
5800 1 16.034348 288.98261 -1777.3986 0.75453006 74.043714 426.39413 -10.303462 10.303462 -8.8170453 8.8170453 -9.4104491 9.4104491
5900 1 16.340171 280.38706 -1206.9118 0.74887714 75.316239 413.71139 -10.329322 10.329322 -8.839175 8.839175 -9.4340681 9.4340681
6000 1 16.664466 286.74197 1123.4523 0.74338001 70.383994 423.08805 -10.354721 10.354721 -8.8609094 8.8609094 -9.4572653 9.4572653
6100 1 16.962494 291.79999 -288.62936 0.74467011 90.800606 430.55117 -10.348737 10.348737 -8.8557894 8.8557894 -9.4518007 9.4518007
6200 1 17.267781 301.46445 -1396.0945 0.72882295 107.013 444.8111 -10.423206 10.423206 -8.919515 8.919515 -9.5198152 9.5198152
6300 1 17.556348 302.85292 -1560.8052 0.71398583 112.07428 446.85977 -10.494912 10.494912 -8.9808765 8.9808765 -9.5853064 9.5853064
6400 1 17.88206 307.62495 -329.53758 0.70502616 103.42358 453.90091 -10.539183 10.539183 -9.0187603 9.0187603 -9.6257399 9.6257399
6500 1 18.19864 309.06103 -311.95271 0.70780421 89.273065 456.01984 -10.525376 10.525376 -9.0069456 9.0069456 -9.61313 9.61313
6600 1 18.504415 275.19507 1201.4185 0.70312208 124.34384 406.05059 -10.548688 10.548688 -9.026894 9.026894 -9.634421 9.634421
6700 1 18.829584 289.08543 114.48833 0.71455451 97.458019 426.54584 -10.492127 10.492127 -8.9784934 8.9784934 -9.5827629 9.5827629
6800 1 19.140931 310.93163 -1124.1018 0.72071523 66.582549 458.77992 -10.462146 10.462146 -8.9528372 8.9528372 -9.55538 9.55538
6900 1 19.450646 308.17225 2920.0507 0.75147775 80.314148 454.70845 -10.317393 10.317393 -8.8289667 8.8289667 -9.4231728 9.4231728
7000 1 19.737918 313.17376 3726.7724 0.76867975 73.444754 462.08819 -10.239848 10.239848 -8.7626092 8.7626092 -9.3523493 9.3523493
7100 1 20.023809 302.30685 1590.5571 0.76949601 87.595109 446.05405 -10.236226 10.236226 -8.7595097 8.7595097 -9.3490412 9.3490412
7200 1 20.314197 300.14635 1689.3483 0.76138139 77.715753 442.86623 -10.272463 10.272463 -8.7905187 8.7905187 -9.3821372 9.3821372
7300 1 20.610775 302.87423 2397.3407 0.73316155 56.286735 446.89122 -10.402605 10.402605 -8.901886 8.901886 -9.5009997 9.5009997
7400 1 20.928892 287.97106 1259.232 0.73237166 70.087614 424.90159 -10.406344 10.406344 -8.9050852 8.9050852 -9.5044142 9.5044142
7500 1 21.197044 295.1818 3800.3428 0.72976123 66.002691 435.54103 -10.418737 10.418737 -8.9156907 8.9156907 -9.5157335 9.5157335
7600 1 21.505377 292.05877 3851.8499 0.72243063 99.618317 430.933 -10.453859 10.453859 -8.9457455 8.9457455 -9.547811 9.547811
7700 1 21.866677 304.98152 1454.5319 0.72851865 106.25941 450.00053 -10.424657 10.424657 -8.9207568 8.9207568 -9.5211405 9.5211405
7800 1 22.176328 307.31113 -1430.8245 0.73880563 106.05752 453.43787 -10.376047 10.376047 -8.8791595 8.8791595 -9.4767436 9.4767436
7900 1 22.497471 304.31356 2102.1023 0.7462869 109.08055 449.01495 -10.341259 10.341259 -8.8493896 8.8493896 -9.4449702 9.4449702
8000 1 22.802036 296.25284 320.05482 0.74918366 109.6731 437.12135 -10.327913 10.327913 -8.8379693 8.8379693 -9.4327813 9.4327813
8100 1 23.104933 303.35394 1439.4794 0.74740305 78.713931 447.59903 -10.336108 10.336108 -8.8449823 8.8449823 -9.4402662 9.4402662
8200 1 23.436693 300.40598 -961.86342 0.76754228 71.650776 443.24931 -10.244904 10.244904 -8.7669357 8.7669357 -9.3569669 9.3569669
8300 1 23.733105 293.56743 1158.1244 0.78144978 70.827227 433.15904 -10.183764 10.183764 -8.7146155 8.7146155 -9.3011255 9.3011255
8400 1 24.051124 294.71009 131.01686 0.77635103 58.271566 434.84502 -10.206009 10.206009 -8.7336519 8.7336519 -9.3214431 9.3214431
8500 1 24.345134 287.94965 833.46441 0.77339271 63.113885 424.87 -10.219006 10.219006 -8.7447735 8.7447735 -9.3333132 9.3333132
8600 1 24.660487 288.2424 1799.8702 0.77636512 76.420254 425.30194 -10.205948 10.205948 -8.7335991 8.7335991 -9.3213867 9.3213867
8700 1 24.959984 295.02161 6027.2258 0.78566905 93.447303 435.30467 -10.165501 10.165501 -8.6989875 8.6989875 -9.2844458 9.2844458
8800 1 25.276826 303.92917 413.96601 0.78039517 97.53353 448.44778 -10.188349 10.188349 -8.7185393 8.7185393 -9.3053134 9.3053134
8900 1 25.602542 310.81466 -580.45286 0.78045428 95.505731 458.60733 -10.188092 10.188092 -8.7183192 8.7183192 -9.3050785 9.3050785
9000 1 25.944496 303.59211 652.88559 0.79563298 103.13249 447.95045 -10.122888 10.122888 -8.6625216 8.6625216 -9.2455256 9.2455256
9100 1 26.280397 289.77318 3422.0802 0.78212549 110.17671 427.56061 -10.18083 10.18083 -8.7121052 8.7121052 -9.2984462 9.2984462
9200 1 26.597841 290.35793 2504.1524 0.759227 87.146277 428.42341 -10.28217 10.28217 -8.7988255 8.7988255 -9.3910031 9.3910031
9300 1 26.887998 278.27024 1078.5002 0.76661239 78.938967 410.58801 -10.249045 10.249045 -8.770479 8.770479 -9.3607487 9.3607487
9400 1 27.196754 280.52178 4036.5351 0.78250226 73.359349 413.91016 -10.179196 10.179196 -8.7107066 8.7107066 -9.2969536 9.2969536
9500 1 27.496995 276.78583 797.44351 0.76423187 91.877923 408.39776 -10.259676 10.259676 -8.7795759 8.7795759 -9.3704579 9.3704579
9600 1 27.867598 301.86798 1892.7737 0.7719009 62.566604 445.4065 -10.225585 10.225585 -8.7504034 8.7504034 -9.339322 9.339322
9700 1 28.172043 302.18396 2076.2716 0.78708258 68.091087 445.87272 -10.159412 10.159412 -8.6937769 8.6937769 -9.2788844 9.2788844
9800 1 28.451247 308.0632 3673.8857 0.80266297 67.594201 454.54755 -10.093248 10.093248 -8.6371577 8.6371577 -9.2184546 9.2184546
9900 1 28.758492 303.16833 1403.4219 0.79729559 88.514846 447.32516 -10.115846 10.115846 -8.6564961 8.6564961 -9.2390945 9.2390945
10000 1 29.049933 299.02031 1832.5467 0.78841679 108.76518 441.20476 -10.153678 10.153678 -8.68887 8.68887 -9.2736473 9.2736473
10100 1 29.341176 309.08011 -36.217031 0.77428458 94.714924 456.048 -10.215081 10.215081 -8.7414146 8.7414146 -9.3297283 9.3297283
10200 1 29.652703 294.01379 2249.2706 0.7796931 101.91593 433.81763 -10.191406 10.191406 -8.7211554 8.7211554 -9.3081056 9.3081056
10300 1 29.960254 300.45617 414.08053 0.78266375 60.845189 443.32337 -10.178496 10.178496 -8.7101075 8.7101075 -9.2963141 9.2963141
10400 1 30.272915 287.55795 583.06291 0.79075939 65.324339 424.29203 -10.143641 10.143641 -8.6802814 8.6802814 -9.2644806 9.2644806
10424 1 30.331524 294.98189 1392.6746 0.79208863 52.736556 435.24606 -10.137964 10.137964 -8.675423 8.675423 -9.2592953 9.2592953
Loop time of 30.3318 on 1 procs for 10000 steps with 496 atoms
Performance: 28.485 ns/day, 0.843 hours/ns, 329.687 timesteps/s, 163.525 katom-step/s
88.1% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 22.298 | 22.298 | 22.298 | 0.0 | 73.51
Bond | 0.92718 | 0.92718 | 0.92718 | 0.0 | 3.06
Kspace | 1.2082 | 1.2082 | 1.2082 | 0.0 | 3.98
Neigh | 1.2867 | 1.2867 | 1.2867 | 0.0 | 4.24
Comm | 0.23532 | 0.23532 | 0.23532 | 0.0 | 0.78
Output | 3.7528 | 3.7528 | 3.7528 | 0.0 | 12.37
Modify | 0.59192 | 0.59192 | 0.59192 | 0.0 | 1.95
Other | | 0.0322 | | | 0.11
Nlocal: 496 ave 496 max 496 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 7842 ave 7842 max 7842 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 218763 ave 218763 max 218763 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 218763
Ave neighs/atom = 441.05444
Ave special neighs/atom = 9.2258065
Neighbor list builds = 308
Dangerous builds = 0
System init for write_data ...
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.22984701
grid = 10 9 9
stencil order = 5
estimated absolute RMS force accuracy = 0.0020136148
estimated relative force accuracy = 6.0637969e-06
using double precision FFTW3
3d grid and FFT values/proc = 3360 810
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
System init for write_data ...
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.22984701
grid = 10 9 9
stencil order = 5
estimated absolute RMS force accuracy = 0.0020136148
estimated relative force accuracy = 6.0637969e-06
using double precision FFTW3
3d grid and FFT values/proc = 3360 810
Generated 0 of 136 mixed pair_coeff terms from arithmetic mixing rule
Total wall time: 0:00:34
Analyze the log file and plot the physical properties of the system:
from shutil import copyfile
copyfile('./log.lammps', './log.lammps.relax')
log0=None
with open('./log.lammps.relax', 'r') as log0file:
log0 = log0file.readlines()
startPattern = re.compile("Per MPI rank memory allocation")
endPattern = re.compile("Loop time of")
list_starts = []
list_ends = []
for i in range(0, len(log0)):
for match in re.finditer(startPattern, log0[i]):
list_starts.append(i)
for match in re.finditer(endPattern, log0[i]):
list_ends.append(i)
log_df_list = []
for i in range(0, len(list_starts)):
pd_str = ''.join(log0[list_starts[i]+1: list_ends[i]])
new_df = pd.read_csv(io.StringIO(pd_str), sep=r'\s+')
if i > 0:
new_df['time'] = (new_df['Step']-log_df_list[-1]['Step'].max())* new_df['Dt'] + log_df_list[-1]['time'].max()
log_df_list.append(new_df.loc[1:,:])
else:
new_df['time'] = new_df['Step'] * new_df['Dt']
log_df_list.append(new_df)
#log_df_list = [pd.concat(log_df_list, axis=0)]
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import plotly
default_colors = plotly.colors.DEFAULT_PLOTLY_COLORS
fig = make_subplots(rows=2, cols=2, start_cell="top-left", subplot_titles=("Temperature vs. Simulation Time",
"Pressure vs. Simulation Time",
"Density vs. Simulation Time",
"Potential Energy vs. Simulation Time"))
simulation_names = ['minimization1', 'npt1', 'minimization2', 'npt2', 'minimization3', 'npt3']
for i in range(0, len(log_df_list)):
fig.add_trace(go.Scatter(x=log_df_list[i]['time'],
y=log_df_list[i]['Temp'],
mode = 'lines',
line_color=default_colors[i%10],
name='Temperature (K)',),
row=1, col=1)
fig.add_trace(go.Scatter(x=log_df_list[i]['time'],
y=log_df_list[i]['Press'],
mode = 'lines',
line_color=default_colors[i%10],
name='Pressure (atm)',),
row=1, col=2)
fig.add_trace(go.Scatter(x=log_df_list[i]['time'],
y=log_df_list[i]['Density'],
mode = 'lines',
line_color=default_colors[i%10],
name='Density (g/cm^3)',),
row=2, col=1)
fig.add_trace(go.Scatter(x=log_df_list[i]['time'],
y=log_df_list[i]['PotEng'],
mode = 'lines',
line_color=default_colors[i%10],
name='Potential Energy (kCal/mol)',),
row=2, col=2)
fig.update_layout(height=1000, width=1400,
title_text="Relaxation Analysis")
fig.update_xaxes(title_text="Simulation Time (fs)", row=1, col=1)
fig.update_xaxes(title_text="Simulation Time (fs)", row=1, col=2)
fig.update_xaxes(title_text="Simulation Time (fs)", row=2, col=1)
fig.update_xaxes(title_text="Simulation Time (fs)", row=2, col=2)
fig.update_yaxes(title_text="Temperature (K)", row=1, col=1)
fig.update_yaxes(title_text="Pressure (atm)", row=1, col=2)
fig.update_yaxes(title_text="Density (g/cm^3)", row=2, col=1)
fig.update_yaxes(title_text="Potential Energy (kCal/mol)", row=2, col=2)
fig.update_layout(template="seaborn")
fig.show()
Visualize the xyz format trajectory:
_natoms, _nsteps, _xyzs = read_xyz_traj()
viz_xyz_traj(_natoms, _nsteps, _xyzs, mass_df)
Read xyz file with: 496 atoms, 100 frames.
Visualize the LAMMPS format trajectory:
viz_lmp_traj(type2cgenff, fname="traj.lammpstrj", writeHTML=True)
Generate a list of jobs with different temperature and pressure value combinations
import os
from shutil import copyfile
walltime_hours = 20
walltime_minutes = 0
walltime_seconds = 0
YOUR_ALLOCATION = "TEST"
YOUR_PARTITION = "batch"
CPU_PER_NODE = 16
NODE_NUM = 1
YOUR_EMAIL = "xyan11@uic.edu"
YOUR_PACKAGES = "lammps/latest"
cwd = os.getcwd()
slurm_submit_template = "#!/bin/bash\n"
torque_submit_template = "#!/bin/bash\n"
for temperature in [283.15, 303.15, 323.15, 343.15, 363.15]:
for pressure in [1., 2.]:
str_pres = "%.2f" % pressure
str_temp = "%.2f" % temperature
dirname = str_pres + "bar_" + str_temp + "K"
os.makedirs(dirname, exist_ok=True)
lmp_relax="""
variable Nprint equal 100
variable T equal """ + str_temp + """
variable P equal """ + str_pres + """
units real
atom_style full
boundary p p p
read_data bulk_melt.data
include cgenff36.ff
thermo ${Nprint}
thermo_style custom step dt cpu temp press density pe ke xlo xhi ylo yhi zlo zhi
thermo_modify flush yes
velocity all create $T 1234 rot no dist gaussian
minimize 1.0e-20 1.0e-20 1000 1000
#reset_timestep 0
dump dump1 all custom ${Nprint} traj.lammpstrj id mol type element mass q x y z ix iy iz
dump dump2 all xyz ${Nprint} traj.xyz
fix fxnpt all npt temp $T $T 150 iso $P $P 250
timestep 1.0
run 1000000
unfix fxnpt
write_data data.* nocoeff
write_data data.relaxed nocoeff
"""
with open(os.path.join(dirname, 'in.relax'), 'w') as lmp_script_file:
lmp_script_file.write(lmp_relax)
copyfile('bulk_melt.data', os.path.join(dirname, 'bulk_melt.data'))
copyfile('cgenff36.ff', os.path.join(dirname, 'cgenff36.ff'))
slurm_template = """#!/bin/bash
#
#SBATCH --job-name=""" + dirname + """
#SBATCH --partition=""" + YOUR_PARTITION + """
#SBATCH --nodes=""" + str(NODE_NUM) + """
#SBATCH --ntasks-per-node=""" + str(int(CPU_PER_NODE)) + """
#SBATCH --output=""" + dirname + """-%j.out
#SBATCH --error=""" + dirname + """-%j.error
#SBATCH --mail-user=""" + YOUR_EMAIL + """
#SBATCH --mail-type=ALL
#SBATCH --time=""" + ("%02d" % walltime_hours).zfill(2) + """:""" + "%02d" % walltime_minutes + """:""" + "%02d" % walltime_seconds + """
cd """ + os.path.join(cwd, dirname) + """
module load """ + YOUR_PACKAGES + """
export OMP_NUM_THREADS=1
mpiexec -np """ + str(int(CPU_PER_NODE)) + """ LAMMPS_EXE -in relax.in
"""
with open(os.path.join(dirname, 'lammps.slurm'), 'w') as job_script_file:
job_script_file.write(slurm_template)
slurm_submit_template = slurm_submit_template + "\ncd " + os.path.join(cwd, dirname) + """
echo "submitting """ + dirname + """!"
sbatch lammps.slurm
"""
torque_template = """#!/bin/bash
#
#PBS -l walltime=""" + "%02d" % walltime_hours + """:""" + "%02d" % walltime_minutes + """:""" + "%02d" % walltime_seconds + """
#PBS -l procs=""" + str(int(CPU_PER_NODE) * int(NODE_NUM)) + """
#PBS -m abe
#PBS -j oe
#PBS -M """ + YOUR_EMAIL + """
#PBS -N """ + dirname + """
#PBS -q """ + YOUR_PARTITION + """
#
cd """ + os.path.join(cwd, dirname) + """
module load """ + YOUR_PACKAGES + """
export OMP_NUM_THREADS=1
mpiexec -np """ + str(int(CPU_PER_NODE) * int(NODE_NUM)) + """ LAMMPS_EXE -in relax.in
"""
with open(os.path.join(dirname, 'lammps.pbs'), 'w') as job_script_file:
job_script_file.write(torque_template)
torque_submit_template = slurm_submit_template + "\ncd " + os.path.join(cwd, dirname) + """
echo "submitting """ + dirname + """!"
qsub lammps.pbs
"""
with open(os.path.join(cwd, 'submit_slurm.bash'), 'w') as job_script_file:
job_script_file.write(slurm_submit_template)
with open(os.path.join(cwd, 'submit_pbs.bash'), 'w') as job_script_file:
job_script_file.write(torque_submit_template)
#!tar -cf lmprun.tar.gz *.00bar_*15K